<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>手工组卷 - 教材资源管理系统</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.8/dist/chart.umd.min.js"></script>
    
    <!-- Tailwind 配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CBCB',
                        accent: '#FF7D00',
                        neutral: '#F5F7FA',
                        'neutral-dark': '#4E5969',
                        success: '#00B42A',
                        warning: '#FF7D00',
                        danger: '#F53F3F',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .question-card {
                transition: all 0.3s ease;
            }
            .question-card:hover {
                transform: translateY(-2px);
                box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            }
            .scale-hover {
                transition: transform 0.2s ease;
            }
            .scale-hover:hover {
                transform: scale(1.02);
            }
            .selected-question {
                background-color: #e6f7ff;
                border-left: 3px solid #165DFF;
            }
            .tree-line {
                position: relative;
            }
            .tree-line::before {
                content: '';
                position: absolute;
                left: 0.5rem;
                top: 0;
                bottom: 0;
                width: 1px;
                background-color: #e2e8f0;
            }
        }
    </style>
</head>
<body class="bg-gray-50 font-inter text-gray-800 min-h-screen flex flex-col">
    <!-- 顶部导航栏 -->
    <header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <button id="sidebar-toggle" class="lg:hidden text-gray-500 hover:text-primary transition-colors">
                    <i class="fa fa-bars text-xl"></i>
                </button>
                <h1 class="text-xl font-bold text-primary flex items-center">
                    <i class="fa fa-book mr-2"></i>
                    <span>教材资源管理系统</span>
                </h1>
            </div>
            
            <div class="hidden md:flex items-center space-x-6">
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">首页</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">题库</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">教材版本</a>
                <a href="#" class="text-primary font-medium border-b-2 border-primary pb-1">统计分析</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">系统设置</a>
            </div>
            
            <div class="flex items-center space-x-4">
                <div class="relative">
                    <input type="text" placeholder="搜索题目..." 
                           class="pl-10 pr-4 py-2 rounded-full bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all w-40 lg:w-64">
                    <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                </div>
                
                <div class="relative">
                    <button class="text-gray-500 hover:text-primary transition-colors">
                        <i class="fa fa-bell text-xl"></i>
                        <span class="absolute -top-1 -right-1 bg-danger text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
                    </button>
                </div>
                
                <div class="flex items-center space-x-2 cursor-pointer group">
                    <img src="https://picsum.photos/id/64/40/40" alt="用户头像" class="w-8 h-8 rounded-full object-cover border-2 border-transparent group-hover:border-primary transition-all">
                    <span class="hidden md:inline font-medium">张老师</span>
                    <i class="fa fa-angle-down text-gray-400 group-hover:text-primary transition-colors"></i>
                </div>
            </div>
        </div>
    </header>

    <div class="flex flex-1 overflow-hidden">
        <!-- 左侧边栏 - 教材版本与章节导航 -->
        <aside id="sidebar" class="w-64 bg-white shadow-md transform -translate-x-full lg:translate-x-0 fixed lg:static h-full z-40 transition-transform duration-300 ease-in-out overflow-y-auto scrollbar-hide">
            <div class="p-4 border-b">
                <div class="flex items-center justify-between mb-3">
                    <h2 class="font-bold text-lg">教材版本导航</h2>
                    <div class="relative">
                        <select class="appearance-none bg-gray-100 rounded-lg px-3 py-1 pr-8 focus:outline-none focus:ring-1 focus:ring-primary">
                            <option>全部学科</option>
                            <option selected>数学</option>
                            <option>物理</option>
                            <option>化学</option>
                            <option>生物</option>
                        </select>
                        <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                    </div>
                </div>
                
                <div class="relative">
                    <input type="text" placeholder="搜索章节..." 
                           class="w-full pl-8 pr-4 py-2 rounded-lg bg-gray-100 focus:outline-none focus:ring-1 focus:ring-primary">
                    <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                </div>
            </div>
            
            <!-- 教材版本选择 -->
            <div class="p-4 border-b">
                <h3 class="font-medium text-sm text-gray-500 mb-2">选择教材版本</h3>
                <div class="space-y-2">
                    <div class="relative">
                        <select id="version-selector" class="w-full appearance-none bg-gray-100 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-1 focus:ring-primary">
                            <option value="RJ-2023" selected>人教版 2023版</option>
                            <option value="SX-2022">苏教版 2022版</option>
                            <option value="BS-2023">北师大版 2023版</option>
                            <option value="HK-2024">沪科版 2024版</option>
                        </select>
                        <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                    </div>
                </div>
            </div>
            
            <!-- 章节树形导航 -->
            <div class="p-4">
                <div class="flex items-center justify-between mb-3">
                    <h3 class="font-medium text-sm text-gray-500">章节结构</h3>
                    <div class="flex space-x-1">
                        <button id="expand-all" class="text-xs text-gray-500 hover:text-primary">展开</button>
                        <span class="text-gray-300">|</span>
                        <button id="collapse-all" class="text-xs text-gray-500 hover:text-primary">收起</button>
                    </div>
                </div>
                
                <div class="space-y-1">
                    <!-- 章节1 -->
                    <div class="chapter-item">
                        <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                            <div class="flex items-center">
                                <i class="fa fa-book text-primary mr-2"></i>
                                <span class="font-medium">第一章 集合与常用逻辑用语</span>
                            </div>
                            <i class="fa fa-angle-down text-gray-400 transition-transform"></i>
                        </div>
                        
                        <div class="pl-6 mt-1 space-y-1">
                            <div class="section-item">
                                <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                                    <div class="flex items-center">
                                        <i class="fa fa-bookmark-o text-secondary mr-2"></i>
                                        <span>1.1 集合的含义与表示</span>
                                    </div>
                                    <span class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">4课时</span>
                                </div>
                                
                                <div class="pl-6 mt-1 space-y-1 tree-line">
                                    <div class="knowledge-item bg-primary/5 border-l-2 border-primary p-2 rounded-r-lg cursor-pointer hover:bg-primary/10 transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-primary mr-2"></i>
                                                <span>集合的定义</span>
                                            </div>
                                            <span class="text-xs text-gray-500">8题</span>
                                        </div>
                                    </div>
                                    
                                    <div class="knowledge-item hover:bg-gray-50 p-2 rounded-lg cursor-pointer transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-gray-400 mr-2"></i>
                                                <span>集合的表示方法</span>
                                            </div>
                                            <span class="text-xs text-gray-500">5题</span>
                                        </div>
                                    </div>
                                    
                                    <div class="knowledge-item hover:bg-gray-50 p-2 rounded-lg cursor-pointer transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-gray-400 mr-2"></i>
                                                <span>元素与集合的关系</span>
                                            </div>
                                            <span class="text-xs text-gray-500">4题</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </aside>
        
        <!-- 主内容区 -->
        <main class="flex-1 overflow-y-auto bg-gray-50 p-4 lg:p-6">
            <div class="container mx-auto">
                <!-- 面包屑导航 -->
                <div class="flex items-center text-sm text-gray-500 mb-4">
                    <a href="#" class="hover:text-primary">首页</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <a href="#" class="hover:text-primary">教材版本管理</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <a href="#" class="hover:text-primary">人教版 2023版</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <a href="#" class="hover:text-primary">第一章 集合与常用逻辑用语</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <a href="#" class="hover:text-primary">集合的定义</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <span class="text-primary font-medium">手工组卷</span>
                </div>
                
                <!-- 内容标题区 -->
                <div class="flex flex-col md:flex-row md:items-center justify-between mb-6">
                    <div>
                        <h2 class="text-[clamp(1.5rem,3vw,2rem)] font-bold text-gray-800">手工组卷</h2>
                        <p class="text-gray-500 mt-1">从题库中手动选择题目，创建自定义试卷</p>
                    </div>
                    
                    <div class="flex flex-wrap gap-3 mt-4 md:mt-0">
                        <button id="create-paper-btn" class="bg-primary text-white px-4 py-2 rounded-lg hover:bg-primary/90 transition-colors flex items-center">
                            <i class="fa fa-check-circle mr-2"></i> 生成试卷
                        </button>
                        <button class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 transition-colors flex items-center">
                            <i class="fa fa-filter mr-2"></i> 筛选题目
                        </button>
                        <button class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 transition-colors flex items-center">
                            <i class="fa fa-save mr-2"></i> 保存选题
                        </button>
                    </div>
                </div>
                
                <!-- 试卷信息 -->
                <div class="bg-white rounded-xl shadow-sm p-6 mb-6">
                    <div class="grid grid-cols-1 md:grid-cols-4 gap-6">
                        <div>
                            <p class="text-gray-500 text-sm mb-1">试卷名称</p>
                            <input type="text" value="集合的定义 - 手工试卷" class="w-full p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-1 focus:ring-primary">
                        </div>
                        
                        <div>
                            <p class="text-gray-500 text-sm mb-1">适用班级</p>
                            <select class="w-full p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-1 focus:ring-primary">
                                <option>高一(1)班</option>
                                <option>高一(2)班</option>
                                <option>高一(3)班</option>
                                <option>高一(4)班</option>
                            </select>
                        </div>
                        
                        <div>
                            <p class="text-gray-500 text-sm mb-1">考试时长</p>
                            <div class="flex items-center">
                                <input type="number" value="45" class="w-full p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-1 focus:ring-primary">
                                <span class="ml-2 text-gray-600">分钟</span>
                            </div>
                        </div>
                        
                        <div>
                            <p class="text-gray-500 text-sm mb-1">总分</p>
                            <div class="flex items-center">
                                <input type="number" value="100" class="w-full p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-1 focus:ring-primary">
                                <span class="ml-2 text-gray-600">分</span>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 选题统计 -->
                    <div class="mt-6 pt-6 border-t border-gray-100">
                        <h3 class="font-medium mb-4">选题统计</h3>
                        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
                            <div class="bg-blue-50 rounded-lg p-4 border border-blue-100">
                                <div class="flex items-center justify-between">
                                    <div>
                                        <p class="text-blue-600 text-sm">选择题</p>
                                        <p class="text-2xl font-bold mt-1">4 / 5</p>
                                    </div>
                                    <div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center">
                                        <i class="fa fa-check-square-o text-blue-600 text-xl"></i>
                                    </div>
                                </div>
                                <div class="mt-3 w-full bg-blue-100 rounded-full h-2">
                                    <div class="bg-blue-600 h-2 rounded-full" style="width: 80%"></div>
                                </div>
                            </div>
                            
                            <div class="bg-green-50 rounded-lg p-4 border border-green-100">
                                <div class="flex items-center justify-between">
                                    <div>
                                        <p class="text-green-600 text-sm">填空题</p>
                                        <p class="text-2xl font-bold mt-1">3 / 3</p>
                                    </div>
                                    <div class="w-12 h-12 bg-green-100 rounded-full flex items-center justify-center">
                                        <i class="fa fa-edit text-green-600 text-xl"></i>
                                    </div>
                                </div>
                                <div class="mt-3 w-full bg-green-100 rounded-full h-2">
                                    <div class="bg-green-600 h-2 rounded-full" style="width: 100%"></div>
                                </div>
                            </div>
                            
                            <div class="bg-orange-50 rounded-lg p-4 border border-orange-100">
                                <div class="flex items-center justify-between">
                                    <div>
                                        <p class="text-orange-600 text-sm">解答题</p>
                                        <p class="text-2xl font-bold mt-1">2 / 3</p>
                                    </div>
                                    <div class="w-12 h-12 bg-orange-100 rounded-full flex items-center justify-center">
                                        <i class="fa fa-file-text-o text-orange-600 text-xl"></i>
                                    </div>
                                </div>
                                <div class="mt-3 w-full bg-orange-100 rounded-full h-2">
                                    <div class="bg-orange-600 h-2 rounded-full" style="width: 66%"></div>
                                </div>
                            </div>
                            
                            <div class="bg-purple-50 rounded-lg p-4 border border-purple-100">
                                <div class="flex items-center justify-between">
                                    <div>
                                        <p class="text-purple-600 text-sm">总分值</p>
                                        <p class="text-2xl font-bold mt-1">75 / 100</p>
                                    </div>
                                    <div class="w-12 h-12 bg-purple-100 rounded-full flex items-center justify-center">
                                        <i class="fa fa-calculator text-purple-600 text-xl"></i>
                                    </div>
                                </div>
                                <div class="mt-3 w-full bg-purple-100 rounded-full h-2">
                                    <div class="bg-purple-600 h-2 rounded-full" style="width: 75%"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 题目类型选项卡 -->
                <div class="bg-white rounded-xl shadow-sm mb-6 overflow-hidden">
                    <div class="border-b border-gray-100">
                        <div class="flex overflow-x-auto scrollbar-hide">
                            <button class="px-6 py-4 font-medium text-primary border-b-2 border-primary">选择题</button>
                            <button class="px-6 py-4 font-medium text-gray-500 hover:text-gray-700">填空题</button>
                            <button class="px-6 py-4 font-medium text-gray-500 hover:text-gray-700">解答题</button>
                            <button class="px-6 py-4 font-medium text-gray-500 hover:text-gray-700">证明题</button>
                            <button class="px-6 py-4 font-medium text-gray-500 hover:text-gray-700">应用题</button>
                        </div>
                    </div>
                    
                    <!-- 选择题列表 -->
                    <div class="p-6">
                        <div class="flex flex-col md:flex-row md:items-center justify-between mb-6">
                            <h3 class="font-medium">选择题 (8题)</h3>
                            <div class="flex space-x-3 mt-3 md:mt-0">
                                <div class="relative">
                                    <select class="appearance-none bg-gray-100 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-1 focus:ring-primary">
                                        <option>难度: 全部</option>
                                        <option>简单</option>
                                        <option>中等</option>
                                        <option>困难</option>
                                    </select>
                                    <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                                </div>
                                
                                <div class="relative">
                                    <select class="appearance-none bg-gray-100 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-1 focus:ring-primary">
                                        <option>分值: 全部</option>
                                        <option>3分</option>
                                        <option>4分</option>
                                        <option>5分</option>
                                    </select>
                                    <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                                </div>
                                
                                <button class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 transition-colors flex items-center">
                                    <i class="fa fa-random mr-2"></i> 随机选题
                                </button>
                            </div>
                        </div>
                        
                        <!-- 题目列表 -->
                        <div class="space-y-4">
                            <!-- 题目1 - 已选 -->
                            <div class="question-card bg-white border border-gray-200 rounded-xl p-5 hover:shadow-md transition-shadow selected-question">
                                <div class="flex justify-between items-start mb-4">
                                    <div class="flex items-center">
                                        <span class="bg-primary text-white text-xs font-medium px-2.5 py-0.5 rounded-full mr-2">选择题</span>
                                        <span class="bg-blue-100 text-blue-600 text-xs font-medium px-2.5 py-0.5 rounded-full mr-2">5分</span>
                                        <span class="bg-green-100 text-green-600 text-xs font-medium px-2.5 py-0.5 rounded-full">中等</span>
                                    </div>
                                    <button class="text-gray-400 hover:text-danger transition-colors">
                                        <i class="fa fa-times-circle text-xl"></i>
                                    </button>
                                </div>
                                
                                <div class="mb-4">
                                    <p class="font-medium">1. 下列各组对象能构成集合的是（）</p>
                                    <div class="mt-3 ml-4 space-y-2">
                                        <p>A. 充分接近√2的实数的全体</p>
                                        <p>B. 善良的人</p>
                                        <p>C. 某校高一(1)班所有身高在1.7m以上的学生</p>
                                        <p>D. 著名的数学家</p>
                                    </div>
                                </div>
                                
                                <div class="flex justify-between items-center pt-3 border-t border-gray-100">
                                    <div class="flex items-center text-sm text-gray-500">
                                        <i class="fa fa-bookmark-o mr-1"></i>
                                        <span>集合的定义</span>
                                    </div>
                                    <div class="flex items-center">
                                        <span class="text-sm text-gray-500 mr-2">已选择</span>
                                        <button class="bg-primary/10 text-primary px-3 py-1 rounded-lg hover:bg-primary/20 transition-colors">
                                            调整分值
                                        </button>
                                    </div>
                                </div>
                            </div>
                            
                            <!-- 题目2 - 已选 -->
                            <div class="question-card bg-white border border-gray-200 rounded-xl p-5 hover:shadow-md transition-shadow selected-question">
                                <div class="flex justify-between items-start mb-4">
                                    <div class="flex items-center">
                                        <span class="bg-primary text-white text-xs font-medium px-2.5 py-0.5 rounded-full mr-2">选择题</span>
                                        <span class="bg-blue-100 text-blue-600 text-xs font-medium px-2.5 py-0.5 rounded-full mr-2">5分</span>
                                        <span class="bg-green-100 text-green-600 text-xs font-medium px-2.5 py-0.5 rounded-full">中等</span>
                                    </div>
                                    <button class="text-gray-400 hover:text-danger transition-colors">
                                        <i class="fa fa-times-circle text-xl"></i>
                                    </button>
                                </div>
                                
                                <div class="mb-4">
                                    <p class="font-medium">2. 设集合A={x|x是小于5的自然数}，则下列关系正确的是（）</p>
                                    <div class="mt-3 ml-4 space-y-2">
                                        <p>A. 0∈A</p>
                                        <p>B. 1.5∈A</p>
                                        <p>C. -1∈A</p>
                                        <p>D. 5∈A</p>
                                    </div>
                                </div>
                                
                                <div class="flex justify-between items-center pt-3 border-t border-gray-100">
                                    <div class="flex items-center text-sm text-gray-500">
                                        <i class="fa fa-bookmark-o mr-1"></i>
                                        <span>集合的定义</span>
                                    </div>
                                    <div class="flex items-center">
                                        <span class="text-sm text-gray-500 mr-2">已选择</span>
                                        <button class="bg-primary/10 text-primary px-3 py-1 rounded-lg hover:bg-primary/20 transition-colors">
                                            调整分值
                                        </button>
                                    </div>
                                </div>
                            </div>
                            
                            <!-- 题目3 - 未选 -->
                            <div class="question-card bg-white border border-gray-200 rounded-xl p-5 hover:shadow-md transition-shadow">
                                <div class="flex justify-between items-start mb-4">
                                    <div class="flex items-center">
                                        <span class="bg-primary text-white text-xs font-medium px-2.5 py-0.5 rounded-full mr-2">选择题</span>
                                        <span class="bg-blue-100 text-blue-600 text-xs font-medium px-2.5 py-0.5 rounded-full mr-2">5分</span>
                                        <span class="bg-green-100 text-green-600 text-xs font-medium px-2.5 py-0.5 rounded-full">中等</span>
                                    </div>
                                    <button class="text-gray-400 hover:text-primary transition-colors">
                                        <i class="fa fa-plus-circle text-xl"></i>
                                    </button>
                                </div>
                                
                                <div class="mb-4">
                                    <p class="font-medium">3. 下列说法正确的是（）</p>
                                    <div class="mt-3 ml-4 space-y-2">
                                        <p>A. 由1,2,2,4,1组成的集合有5个元素</p>
                                        <p>B. 集合{0}中没有元素</p>
                                        <p>C. 集合{π,e}与集合{e,π}是同一个集合</p>
                                        <p>D. 空集是任何集合的真子集</p>
                                    </div>
                                </div>
                                
                                <div class="flex justify-between items-center pt-3 border-t border-gray-100">
                                    <div class="flex items-center text-sm text-gray-500">
                                        <i class="fa fa-bookmark-o mr-1"></i>
                                        <span>集合的定义</span>
                                    </div>
                                    <button class="bg-primary text-white px-3 py-1 rounded-lg hover:bg-primary/90 transition-colors">
                                        选择本题
                                    </button>
                                </div>
                            </div>
                            
                            <!-- 题目4 - 未选 -->
                            <div class="question-card bg-white border border-gray-200 rounded-xl p-5 hover:shadow-md transition-shadow">
                                <div class="flex justify-between items-start mb-4">
                                    <div class="flex items-center">
                                        <span class="bg-primary text-white text-xs font-medium px-2.5 py-0.5 rounded-full mr-2">选择题</span>
                                        <span class="bg-blue-100 text-blue-600 text-xs font-medium px-2.5 py-0.5 rounded-full mr-2">5分</span>
                                        <span class="bg-red-100 text-red-600 text-xs font-medium px-2.5 py-0.5 rounded-full">困难</span>
                                    </div>
                                    <button class="text-gray-400 hover:text-primary transition-colors">
                                        <i class="fa fa-plus-circle text-xl"></i>
                                    </button>
                                </div>
                                
                                <div class="mb-4">
                                    <p class="font-medium">4. 已知集合A={x|ax²+2x+a=0,a∈R}，若集合A有且仅有2个子集，则a的取值是（）</p>
                                    <div class="mt-3 ml-4 space-y-2">
                                        <p>A. 1</p>
                                        <p>B. -1</p>
                                        <p>C. 0,1</p>
                                        <p>D. -1,0,1</p>
                                    </div>
                                </div>
                                
                                <div class="flex justify-between items-center pt-3 border-t border-gray-100">
                                    <div class="flex items-center text-sm text-gray-500">
                                        <i class="fa fa-bookmark-o mr-1"></i>
                                        <span>集合的定义</span>
                                    </div>
                                    <button class="bg-primary text-white px-3 py-1 rounded-lg hover:bg-primary/90 transition-colors">
                                        选择本题
                                    </button>
                                </div>
                            </div>
                            
                            <!-- 加载更多按钮 -->
                            <div class="text-center py-4">
                                <button class="bg-white border border-gray-300 text-gray-700 px-6 py-3 rounded-lg hover:bg-gray-50 transition-colors flex items-center mx-auto">
                                    <i class="fa fa-refresh mr-2"></i> 加载更多题目
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 已选题目预览 -->
                <div class="bg-white rounded-xl shadow-sm mb-6">
                    <div class="border-b border-gray-100 p-6">
                        <h3 class="font-medium">已选题目预览</h3>
                    </div>
                    
                    <div class="p-6">
                        <div class="flex items-center justify-between mb-4">
                            <h4 class="font-medium text-gray-700">选择题 (4题，共20分)</h4>
                            <button class="text-primary text-sm hover:underline">调整</button>
                        </div>
                        
                        <div class="space-y-3 mb-6">
                            <div class="flex items-center text-sm">
                                <span class="w-6 text-gray-500">1.</span>
                                <span>下列各组对象能构成集合的是（）</span>
                                <span class="ml-auto text-gray-500">5分</span>
                            </div>
                            
                            <div class="flex items-center text-sm">
                                <span class="w-6 text-gray-500">2.</span>
                                <span>设集合A={x|x是小于5的自然数}，则下列关系正确的是（）</span>
                                <span class="ml-auto text-gray-500">5分</span>
                            </div>
                            
                            <div class="flex items-center text-sm">
                                <span class="w-6 text-gray-500">3.</span>
                                <span>已知集合A={x|ax²+2x+a=0,a∈R}，若集合A有且仅有2个子集，则a的取值是（）</span>
                                <span class="ml-auto text-gray-500">5分</span>
                            </div>
                            
                            <div class="flex items-center text-sm">
                                <span class="w-6 text-gray-500">4.</span>
                                <span>下列说法正确的是（）</span>
                                <span class="ml-auto text-gray-500">5分</span>
                            </div>
                        </div>
                        
                        <div class="flex items-center justify-between mb-4">
                            <h4 class="font-medium text-gray-700">填空题 (3题，共30分)</h4>
                            <button class="text-primary text-sm hover:underline">调整</button>
                        </div>
                        
                        <div class="space-y-3 mb-6">
                            <div class="flex items-center text-sm">
                                <span class="w-6 text-gray-500">1.</span>
                                <span>用列举法表示集合{x∈N|x-1≤2}为__________。</span>
                                <span class="ml-auto text-gray-500">10分</span>
                            </div>
                            
                            <div class="flex items-center text-sm">
                                <span class="w-6 text-gray-500">2.</span>
                                <span>已知集合A={1,3,a}，B={1,a²-a+1}，且B⊆A，则a=__________。</span>
                                <span class="ml-auto text-gray-500">10分</span>
                            </div>
                            
                            <div class="flex items-center text-sm">
                                <span class="w-6 text-gray-500">3.</span>
                                <span>集合{1,2,3}的真子集个数为__________。</span>
                                <span class="ml-auto text-gray-500">10分</span>
                            </div>
                        </div>
                        
                        <div class="flex items-center justify-between mb-4">
                            <h4 class="font-medium text-gray-700">解答题 (2题，共25分)</h4>
                            <button class="text-primary text-sm hover:underline">调整</button>
                        </div>
                        
                        <div class="space-y-3">
                            <div class="flex items-center text-sm">
                                <span class="w-6 text-gray-500">1.</span>
                                <span>已知集合A={x|x²-3x+2=0}，B={x|x²-ax+a-1=0}，若A∪B=A，求实数a的值。</span>
                                <span class="ml-auto text-gray-500">12分</span>
                            </div>
                            
                            <div class="flex items-center text-sm">
                                <span class="w-6 text-gray-500">2.</span>
                                <span>设集合A={x|x²+4x=0}，B={x|x²+2(a+1)x+a²-1=0}，若B⊆A，求实数a的取值范围。</span>
                                <span class="ml-auto text-gray-500">13分</span>
                            </div>
                        </div>
                    </div>
                    
                    <div class="bg-gray-50 p-6 rounded-b-xl border-t border-gray-100">
                        <div class="flex flex-col md:flex-row md:items-center justify-between">
                            <div class="mb-4 md:mb-0">
                                <div class="flex items-center">
                                    <span class="text-lg font-bold">总分：</span>
                                    <span class="text-lg font-bold text-primary ml-2">75分</span>
                                    <span class="text-gray-500 ml-2">（目标：100分）</span>
                                </div>
                                <p class="text-sm text-gray-500 mt-1">题目数量：9题（选择题4题，填空题3题，解答题2题）</p>
                            </div>
                            
                            <div class="flex space-x-3">
                                <button class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 transition-colors flex items-center">
                                    <i class="fa fa-print mr-2"></i> 预览试卷
                                </button>
                                <button class="bg-primary text-white px-4 py-2 rounded-lg hover:bg-primary/90 transition-colors flex items-center">
                                    <i class="fa fa-check-circle mr-2"></i> 确认生成试卷
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>
    
    <!-- JavaScript -->
    <script>
        // 侧边栏切换
        document.getElementById('sidebar-toggle').addEventListener('click', function() {
            const sidebar = document.getElementById('sidebar');
            sidebar.classList.toggle('-translate-x-full');
        });
        
        // 章节展开/收起
        document.querySelectorAll('.chapter-item > div:first-child, .section-item > div:first-child').forEach(item => {
            item.addEventListener('click', function() {
                const content = this.nextElementSibling;
                const icon = this.querySelector('i.fa-angle-down');
                
                if (content.style.display === 'none') {
                    content.style.display = 'block';
                    icon.style.transform = 'rotate(180deg)';
                } else {
                    content.style.display = 'none';
                    icon.style.transform = 'rotate(0)';
                }
            });
        });
        
        // 默认展开第一个章节
        document.querySelector('.chapter-item > div:first-child').click();
        
        // 展开/收起所有章节
        document.getElementById('expand-all').addEventListener('click', function() {
            document.querySelectorAll('.chapter-item > div:first-child, .section-item > div:first-child').forEach(item => {
                const content = item.nextElementSibling;
                const icon = item.querySelector('i.fa-angle-down');
                
                content.style.display = 'block';
                icon.style.transform = 'rotate(180deg)';
            });
        });
        
        document.getElementById('collapse-all').addEventListener('click', function() {
            document.querySelectorAll('.chapter-item > div:first-child, .section-item > div:first-child').forEach(item => {
                const content = item.nextElementSibling;
                const icon = item.querySelector('i.fa-angle-down');
                
                content.style.display = 'none';
                icon.style.transform = 'rotate(0)';
            });
        });
        
        // 题目选择
        document.querySelectorAll('.question-card').forEach(card => {
            const selectBtn = card.querySelector('button:last-child');
            const removeBtn = card.querySelector('.fa-times-circle').parentElement;
            
            if (selectBtn) {
                selectBtn.addEventListener('click', function() {
                    card.classList.add('selected-question');
                    this.innerHTML = '<span class="text-sm text-gray-500 mr-2">已选择</span><button class="bg-primary/10 text-primary px-3 py-1 rounded-lg hover:bg-primary/20 transition-colors">调整分值</button>';
                });
            }
            
            if (removeBtn) {
                removeBtn.addEventListener('click', function() {
                    card.classList.remove('selected-question');
                    const questionContent = card.querySelector('.flex.items-center.justify-between.pt-3');
                    questionContent.innerHTML = '<button class="bg-primary text-white px-3 py-1 rounded-lg hover:bg-primary/90 transition-colors">选择本题</button>';
                });
            }
        });
        
        // 顶部导航栏滚动效果
        window.addEventListener('scroll', function() {
            const header = document.querySelector('header');
            if (window.scrollY > 10) {
                header.classList.add('py-2');
                header.classList.add('shadow');
            } else {
                header.classList.remove('py-2');
                header.classList.remove('shadow');
            }
        });
    </script>
</body>
</html>